﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://wpfimageviewer.codeplex.com
using BrainTechLLC;
using ImageAppViewModels;

namespace WpfImageDuplicates
{
    public class FileImageComparisonHandler : BaseNotifyPropertyChanged
    {
        protected ImageCollectionView _collectionView;

        public FileImageComparisonHandler(ImageCollectionView collectionView)
        {
            _collectionView = collectionView;            
        }

        public void DoCompare(FileImageViewModel foundThumbView, bool on)
        {
            foreach (var thumb in _collectionView._vm) //GetAllFileImageViewModels()
            {
                if (thumb.WantCompare)
                {
                    if (!on)
                    {
                        thumb.Other = null;
                    }
                    else
                    {
                        thumb.Other = foundThumbView;

                        FileImageViewModel.LazySimilarity.LazyLoad(thumb, (t) => { SimilarityDone(t); });
                    }
                }
            }
        }

        public static void SimilarityDone(FileImageViewModel t)
        {
        }

    }
}
